<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>{{ page.title }}</title>
  <meta name="viewport" content="width=device-width">

  <link rel="shortcut icon" href="{% url /favicon.ico?v=1 %}" type="image/x-icon">

  <link rel="stylesheet" type="text/css" href="{% url /css/bootstrap.min.css %}">
  <link rel="stylesheet" type="text/css" href="{% url /css/font-awesome.min.css %}">
  <link rel="stylesheet" type="text/css" href="{% url /css/codemirror.css %}">
  <link rel="stylesheet" type="text/css" href="{% url /css/syntax.css %}">
  <link rel="stylesheet" type="text/css" href="{% url /css/docs.css %}">

  <script type="text/javascript" src="{% url /js/codemirror.js %}"></script>
</head>
<body>

  {% capture version %}{% version %}{% endcapture %}
  <header class="navbar navbar-static-top bs-docs-nav" id="top" role="banner">
    <div class="container">
      <div class="navbar-header">
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="{% url / %}" class="navbar-brand">marty.js</a>
      </div>
      <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
        <ul class="nav navbar-nav">
          <li{% if page.collection == "guides" %} class="active"{% endif %}>
            <a href="{% url /guides/getting-started %}">Guides</a>
            <ul class="nav sub-nav visible-xs-block">
              {% assign sections = site.guides | group_by:"section" %}
              {% for section_name in site.data.guides_section_order %}
                <li {% if page.section == section_name and page.collection == "guides" %} class="active"{% endif %}>
                  {% capture section_url %}/guides/{{section_name | slugify}}/index.html{% endcapture %}

                  <a {% if page.url == section_url %} class="active"{% endif %} href="{{version}}{{section_url}}">
                    {{section_name}}
                  </a>
                </li>
              {% endfor %}
            </ul>
          </li>
          <li{% if page.collection == "api" %} class="active"{% endif %}>
            <a href="{% url /api/top-level-api %}">API</a>
            <ul class="nav sub-nav visible-xs-block">
              {% assign sections = site.api | group_by:"section" %}
              {% for section_name in site.data.api_section_order %}
                <li {% if page.section == section_name and page.collection == "api" %} class="active"{% endif %}>
                  {% capture section_url %}/api/{{section_name | slugify}}/index.html{% endcapture %}

                  <a {% if page.url == section_url %} class="active"{% endif %} href="{{version}}{{section_url}}">
                    {{section_name}}
                  </a>
                </li>
              {% endfor %}
            </ul>
          </li>
          <li{% if page.collection == "support" %} class="active"{% endif %}>
            <a href="{% url /support %}">Support</a>
          </li>
          <li{% if page.collection == "devtools" %} class="active"{% endif %}>
            <a href="{% url /devtools %}">Developer Tools</a>
          </li>
          <li{% if page.sectionid == "blog" %} class="active"{% endif %}>
            {% assign latest_blog = site.posts | first %}

            <a href="{{version}}{{latest_blog.url}}">Blog</a>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li>
            <a href="http://github.com/martyjs/marty">
              <i class="fa fa-github"></i>
              Github
            </a>
          </li>
        </ul>
      </nav>
    </div>
  </header>
  {{ content }}
  <footer class="bs-docs-footer" role="contentinfo">
    <div class="container">
      <p>Code licensed under <a href="https://github.com/martyjs/marty/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
      <ul class="bs-docs-footer-links muted">
        <li>v{{site.current_version}}</li>
        <li>·</li>
        <li><a href="https://github.com/martyjs/marty">GitHub</a></li>
        <li>·</li>
        <li><a href="https://github.com/martyjs/marty/issues">Issues</a></li>
        <li>·</li>
        <li><a href="https://github.com/martyjs/marty/releases">Releases</a></li>
      </ul>
    </div>
  </footer>
  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-56575082-1', 'auto');
    ga('send', 'pageview');

  </script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script type="text/javascript" src="{% url /js/style.js %}"></script>
  <script type="text/javascript" src="{% url /js/headings.js %}"></script>
  <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</body>
</html>